package tianrun.ziguan.api.calculate.config.service.common;

import com.baomidou.mybatisplus.core.metadata.IPage;
import tianrun.ziguan.api.calculate.config.dto.request.common.CopyBody;
import tianrun.ziguan.api.calculate.config.dto.request.common.DeleteBody;
import tianrun.ziguan.api.calculate.config.dto.request.common.InfoBody;
import tianrun.ziguan.api.calculate.config.dto.request.common.add.edit.AddOrEditBody;
import tianrun.ziguan.api.calculate.config.dto.request.common.add.edit.AddOrEditBodyBatch;
import tianrun.ziguan.api.calculate.config.dto.request.common.list.ListBody;
import tianrun.ziguan.api.calculate.config.dto.request.common.list.PageBody;

import java.util.List;
import java.util.Map;
import java.util.Set;

public interface CommonService {

    Object addOrEdit(AddOrEditBody body);

    Object addOrEditBatch(AddOrEditBodyBatch body);

    void delete(DeleteBody body);

    List<Map<String, Object>> list(ListBody body);

    List<Map<String, Object>> list(ListBody body, Boolean after);

    List<Map<String, Object>> listByIds(String tableName, Set<Long> ids, boolean isAll);

    List<Map<String, Object>> listByIds(String primaryKey, String tableName, Set<Long> ids, boolean isAll);

    IPage<Map<String, Object>> page(PageBody body);

    Map<String, Object> info(InfoBody body);

    void copy(CopyBody body);
}
